﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using Happy.Web.Mvc;
using Happy.Cms.Query.Contacts;
using Happy.Cms.Application.Contacts;

namespace Tenoner.WebSite.Controllers
{
    public class ContactController : HappyController
    {
        //
        // GET: /Contact/

        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult SaveContact(ContactView view)
        {
            this
                .Service<ContactService>()
                .Create(view);

            return View("Index");
        }
    }
}
